In a motor control device, higher precision, larger output, and a smaller size is being sought, however there is a problem of heat generation of power devices and a motor. To solve this problem, a new cooling technique in a hardware aspect has been developed.
However, because of an operational environment and an operational condition, the cooling technique in the hardware may not be able to suppress heat generation sufficiently. In most motor control devices, an overheat level is set for power devices and a motor to prevent breakage due to heat generation. A motor control device is controlled so as to be stopped when a temperature of any of the power devices or the motor exceeds the overheat level (for example, Patent Literature 1).
However, in machine tools for example, stopping a motor control device leads to stopping of a production line. For this reason, a technique of suppressing heat generation is necessary so that a motor control device can be operated for a long time at a temperature that does not exceed an overheat level.
For such need, there is proposed a driving device of an alternating current (AC) motor that selects a PWM frequency on the basis of a temperature state of a switching device of an inverter (for example, Patent Literature 2). The term “PWM frequency” indicates a frequency of a pulse signal in a PWM control method. A conventional control device is a control device of an AC motor that controls an applying voltage by an inverter including electric power semiconductor switching devices. The conventional control device includes a temperature detecting unit, a PWM modulating unit, a PWM mode selecting unit, and a carrier wave controlling unit. The temperature detecting unit detects a device temperature of the electric power semiconductor switching device. The PWM modulating unit controls a pulse width modulation voltage that is applied to the AC motor from the inverter, on the basis of a phase voltage command and a carrier wave. The PWM mode selecting unit selects non-synchronization PWM when a device temperature is equal to or lower than a predetermined temperature. The PWM mode selecting unit selects synchronization PWM when a device temperature is higher than the predetermined temperature.
Next, operation of the conventional control device is described by using a flowchart of FIG. 1. At the step S2000, a device temperature Tsw is obtained. Next, at the step S2100, the device temperature Tsw is compared with a predetermined temperature T0. When the device temperature Tsw is higher than the predetermined temperature T0, the control device selects synchronization PWM at the step S2500. When the device temperature Tsw is equal to or lower than the predetermined temperature T0, the control device selects non-synchronization PWM at the step S2600. In this manner, synchronization PWM control or non-synchronization PWM control is selected on the basis of a device temperature Tsw. Thereby, when a device temperature is desired to be decreased, synchronization PWM control is performed to suppress a rise in a device temperature, and when a rise in a device temperature does not need to be suppressed, non-synchronization PWM control is performed to prevent generation of electromagnetic noise that is caused by synchronization PWM.    Patent Literature 1: JP-A-2004-82757    Patent Literature 2: JP-A-2010-246207
In the conventional control device, a PWM frequency is controlled by determining of a temperature of the electric power switching device (power device) used in the inverter. However, a temperature of a motor is not a target of control. A temperature of the motor tends to, on the contrary, rise when a PWM frequency is decreased. Thus, according to the conventional control device, decreasing a PWM frequency can prevent a rise in a temperature of the power device, but on the contrary causes a rise in temperature of the motor.